7.1 Plot Basics
in the menu bar. To add a set of expressions to the plot, first
create a
selection set using Select .
The plotter will replace any expression already in
the plot display if it has the same signature as an expression being
added.
7.1.1 Expression Types
The plotter handles the following types of expression.
- Function Definition
- A real-valued function of a real for which all elaboration variables can be bound is evaluated to produce a sequence of x-y coordinates that can be plotted.
- Variable Definition
- A real variable is treated as an adjustable constant; an interactive control on the plotter display allows the defined value to be changed. Similarly, a composite variable is treated as an adjustable constant; it's interactive control has more than one degree of freedom. See §7.4
- Protected Definition
- A definition in a guard is not plotted but is made available for binding.
- Equation
- If the equation has a function on one side, the equation is treated as a function definition. If the equation has zero on one side, the other side is treated like a formula. If neither side is zero, a new expression in which one side is subtracted from the other side is created and treated as a formula.
- Real Formula
- The formula is examined for unbound variables. If there is exactly one, it is treated as the independent variable and the formula is treated as a function of that variable. If there is more than one, the formula should be rewritten as a function definition with an explicit parameter list so the unbound variables can be determined.
- Composite
- Composite expressions that can be evaluated to a constant value are plotted as position vectors. Composite expressions that can be evaluated to a single-valued function of composites are treated as tuple generators.
- Tuple or tuple generator
- If the expression is a tuple of points constructed from expressions that meet the criteria for plottable expression, the tuple is plotted as a sequence of line segments.
- Set or set generator
- If the expression is a set of plottable expressions, each item is treated as a separate plottable expression.
Note that for any expression containing a tuple of scalars, the tuple is replaced by a vector. Upon return from the plotter to the workspace, such expressions will be updated to reflect the change.
7.1.2 Adjusting the Plot
The default plot displays a horizontal axis from -1 to 1 and a vertical axis from -1 to 1. The axes are sensitive to drag actions at the extremities, the origin and midway between the origin and any extremity.
To change the extent of an axis | drag the extremity. |
To change the scale of either axis | drag the midway. |
To double the scale of all axes | double touch outside the axes area. |
To move the plot on the display | drag the origin. |
To reset the plot to the default configuration | double touch the origin. |
The axes are decorated with tick marks and numerical indicators. The tick marks are at intervals that depend on the axes' extents. The density of tick marks changes logarithmically. Intervals of 1, 10, 100, ... are used.
Grid lines can be displayed at and between tick marks.
To change whether axis and grid lines are displayed, use the
display-grid button. The button cycles
through three options:
displays both axes and grid lines,
displays neither axes nor grid lines and
displays axes without grid lines.
Grid lines are spaced at one-tenth the interval between numbered tick
marks unless that would
place them too close together to be useful.
7.1.3 Managing the Plot Display
To select an expression | touch it in the legend. |
To deselect an expression | touch a selected expression. |
To remove an expression |
select it and touch
![]() |
To protect or hide |
select an expression and touch
![]() |
To remove all expressions |
touch
![]() ![]() |
7.1.4 Saving the Plot Display
The plot display can be saved to
a file in SVG or PNG format. This facility is available only in the
desktop
version of Myron.
To save the plot display, use either of the SVG or PNG buttons in the menu bar.
The buttons will not be visible unless the license contains the SVG
capability. The
files follow the same naming conventions as System SVG using the prefix “plot” (see
§8.2.7).